package com.meituan.sdk.model.ddzh.yuding.bookresultcallback;

import com.meituan.sdk.annotations.ApiMeta;
import com.google.gson.reflect.TypeToken;
import javax.validation.constraints.NotBlank;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;

/**
* 预订结果回调
* This file was automatically generated.
*/
@ApiMeta(
    path = "/ddzh/yuding/bookresultcallback",
    businessId = 58,
    apiVersion = "10028",
    apiName = "bookresultcallback",
    needAuth = true
)
public class BookresultcallbackRequest implements MeituanRequest<BookresultcallbackResponse> {
    /**
    * <p data-diff-id="ct-diff-id-a970005a-71cd-40ae-b934-f1399d89dd52"><span style="color: rgb(31, 45, 61)">美团订单id</span></p>
    */
    @NotBlank(message = "orderId不能为空")
    @SerializedName("orderId")
    private String orderId;
    /**
    * <p data-diff-id="ct-diff-id-1f312ad9-faa2-4e99-851f-fd42394698d4"><span style="color: rgb(31, 45, 61)">预订结果，2-预订成功，3-预订失败</span></p>
    */
    @NotNull(message = "bookStatus不能为空")
    @SerializedName("bookStatus")
    private Long bookStatus;
    /**
    * <p data-diff-id="ct-diff-id-9aa63332-25db-4685-a7c6-32bf91ac40b4"><span style="color: rgb(31, 45, 61)">业务code，应遵从预订接口的错误码，成功返回200；</span><span style="color: rgb(255, 0, 0)">预订失败时用户侧会根据code展示对应文案，详细可参考参数说明</span></p>
    */
    @NotNull(message = "code不能为空")
    @SerializedName("code")
    private Long code;
    /**
    * <p data-diff-id="ct-diff-id-d656ffde-5d8e-4190-8028-2052305ca255"><span style="color: rgb(31, 45, 61)">三方的订单号</span></p>
    */
    @SerializedName("appOrderId")
    private String appOrderId;
    /**
    * <p data-diff-id="ct-diff-id-9596599e-737a-4471-8003-f17cdc292625"><span style="color: #333">生活服务行业新增字段，其他行业不传。</span></p><p data-diff-id="ct-diff-id-57dab817-9eb1-44c1-a9d0-4b0d60eca7cb"><span style="color: #333">交易类型，枚举值：1-预订，2-团单（团购后预约）。</span></p><p data-diff-id="ct-diff-id-845c1f0b-44ec-4b86-9ce7-e562b86bdfff"><span style="color: #333">商家根据此属性字段识别交易类型，</span><span style="color: rgb(245, 34, 45)">预订业务该字段非必传，团购后预约业务必传</span></p>
    */
    @SerializedName("type")
    private Long type;
    /**
    * <p data-diff-id="ct-diff-id-333fdee6-ed89-40e2-bb7a-25065f04188d"><span style="color: rgb(31, 45, 61)">扩展信息，预订失败时无需传该参数</span></p>
    */
    @SerializedName("extMap")
    private String extMap;
    /**
    * <p data-diff-id="ct-diff-id-bccc6a7a-437a-466a-a035-c689bd1660e6"><span style="color: rgb(31, 45, 61)">服务人员id，在美团侧通过接口生成的服务人员id</span></p>
    */
    @SerializedName("serviceTechId")
    private String serviceTechId;

    public String getOrderId() {
        return orderId;
    }
    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }
    public Long getBookStatus() {
        return bookStatus;
    }
    public void setBookStatus(Long bookStatus) {
        this.bookStatus = bookStatus;
    }
    public Long getCode() {
        return code;
    }
    public void setCode(Long code) {
        this.code = code;
    }
    public String getAppOrderId() {
        return appOrderId;
    }
    public void setAppOrderId(String appOrderId) {
        this.appOrderId = appOrderId;
    }
    public Long getType() {
        return type;
    }
    public void setType(Long type) {
        this.type = type;
    }
    public String getExtMap() {
        return extMap;
    }
    public void setExtMap(String extMap) {
        this.extMap = extMap;
    }
    public String getServiceTechId() {
        return serviceTechId;
    }
    public void setServiceTechId(String serviceTechId) {
        this.serviceTechId = serviceTechId;
    }


    @Override
    public MeituanResponse<BookresultcallbackResponse> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<BookresultcallbackResponse>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "BookresultcallbackRequest{" + "orderId=" + orderId + "," + "bookStatus=" + bookStatus + "," + "code=" + code + "," + "appOrderId=" + appOrderId + "," + "type=" + type + "," + "extMap=" + extMap + "," + "serviceTechId=" + serviceTechId + "}";
    }
}
